package org.acy.file.controller;

import org.acy.file.service.ICottonFileInfoService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

//@RequestMapping("/file")
//@RestController
@Component
public class CottonFileController implements CommandLineRunner {

    @Resource
    ICottonFileInfoService cottonFileInfoService;

    //@GetMapping("/transfer")
    public String transferData() {
        return "ok";
    }

    @Override
    public void run(String... args) throws Exception {
        cottonFileInfoService.toNewService();
        //cottonFileInfoService.errorFileService();
    }
}
